<template>
  <Spin fix v-show="visible">
    <Icon type="ios-loading" size="36" class="demo-spin-icon-load"></Icon>
    <div>Loading</div>
  </Spin>
</template>

<script setup>
import {ref} from "vue";
import {Spin, Icon} from "view-ui-plus";

let visible = ref(false);

// 显示组件
let showLoading = () => {
  visible.value = true;
}
// 隐藏组件
let hideLoading = () => {
  visible.value = false;
}

defineExpose({
  visible, showLoading, hideLoading
})
</script>

<style scoped>
@import "./custom-loading.less";
</style>
